<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCmcPromotionPintuanOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cmc_promotion_pintuan_order', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('pintuan_id')->nullable()->comment('拼团ID');
            $table->integer('order_id')->nullable()->comment('订单ID');
            $table->integer('site_id')->nullable()->comment('站点ID');
            $table->string('order_no')->nullable()->comment('订单编号');
            $table->integer('pintuan_status')->nullable()->comment('状态');
            $table->integer('order_type')->nullable()->comment('订单类型');
            $table->integer('head_id')->nullable()->comment('团长ID');
            $table->integer('member_id')->nullable()->comment('订单会员ID');
            $table->string('member_img')->nullable()->comment('会员头像');
            $table->string('nickname')->nullable()->comment('会员昵称');
            $table->integer('group_id')->nullable()->comment('拼团分组ID');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cmc_promotion_pintuan_order');
    }
}
